﻿using System;
using Avalonia.Data.Converters;

namespace Klear.Converters;

public class BooleanConverters
{
    public static readonly IValueConverter TrueFalseToYesNo = new BoolToYesNoConverter();

    private class BoolToYesNoConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return (bool)value ? "Yes" : "No";
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}